Opt out a constraint in all relevant viewmodel

If you need to opt out a constraint in every viewmodel that mentions this constraint, you can use this EAL code.

let constraint = Constraint.allInstances->select(c|c.Name = 'NameOfConstraint')->first in
(
  constraint.ConstrainedElement.Nesting.OwningSpan->forEach(span | span.OptOutConstraints.add(constraint))
)
This page was edited 72 days ago on 10/10/2024. What links here